class DoubleNode:
    """双节点"""

    def __init__(self, data, next_node=None, pre=None):
        self.data = data
        self.next_node = next_node
        self.pre = pre

    def __str__(self):
        return self.data

    @property
    def node_content(self):
        """返回整个节点"""
        return self.pre, self.data, self.next_node


class Node:
    """单节点"""

    def __init__(self, data, next_node=None):
        self.data = data
        self.next_node = next_node

    def __str__(self):
        return self.data

    @property
    def node_content(self):
        """返回整个节点"""
        return self.data, hex(id(self)), self.next_node


# 抽象出链表都有的基本特征和操作
class LinkedList:
    def __init__(self):
        self.head = None
        self.content = []
        print("创建链表成功")

    def insert(self, *args, **kwargs):
        """链表中插入元素"""
        pass

    @property
    def is_empty(self):
        """链表是否为空"""
        return True

    def remove(self, *args, **kwargs):
        """链表删除节点"""
        pass

    def get_head(self):
        """返回链表头节点"""
        pass

    def get_foot(self):
        """返回链表尾节点"""
        pass

    @property
    def length(self):
        """链表长度"""
        return None

    def get_content(self):
        """返回可观测的节点数据列表"""
        pass

    def get_direction(self):
        """返回节点的链接方向"""
        pass

    def add(self, *args, **kwargs):
        """链表头添加元素（头插法）"""
        pass

    def push(self, *args, **kwargs):
        """链表尾添加元素（尾插法）"""
        pass

    def search(self, *args, **kwargs):
        """查找节点所在的索引"""
        pass

    def node_in_list(self, *args, **kwargs):
        """节点是否在链表中"""
        pass

    def pop(self):
        """删除链表最后一个节点"""
        pass

    def reverse(self):
        """将一个链表逆序,采用头插法重新将链表的元素插入一次实现逆序"""
        pass
